Optimal. Leaf size=130 \[ -\frac {\tan ^{-1}\left (\frac {2 x+3}{\sqrt {3} \sqrt {-x^2-4 x-3}}\right )}{3 \sqrt {3}}+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )-\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 11, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.367, Rules used = {6728, 724, 204, 1028, 986, 12, 1026, 1161, 618, 1027, 206} \[ -\frac {\tan ^{-1}\left (\frac {2 x+3}{\sqrt {3} \sqrt {-x^2-4 x-3}}\right )}{3 \sqrt {3}}+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )-\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 206
Rule 618
Rule 724
Rule 986
Rule 1026
Rule 1027
Rule 1028
Rule 1161
Rule 6728
Rubi steps
\begin {align*} \int \frac {1}{x \sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx &=\int \left (\frac {1}{3 x \sqrt {-3-4 x-x^2}}-\frac {2 (2+x)}{3 \sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )}\right ) \, dx\\ &=\frac {1}{3} \int \frac {1}{x \sqrt {-3-4 x-x^2}} \, dx-\frac {2}{3} \int \frac {2+x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=\frac {1}{6} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\frac {1}{3} \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{-12-x^2} \, dx,x,\frac {-6-4 x}{\sqrt {-3-4 x-x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}+\frac {1}{18} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\frac {1}{18} \int -\frac {4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\operatorname {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}-\frac {1}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {2}{9} \int \frac {x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {16}{9} \operatorname {Subst}\left (\int \frac {1+3 x^2}{-4-8 x^2-36 x^4} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\frac {2}{27} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{3}-\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )-\frac {2}{27} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{3}+\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {4}{27} \operatorname {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (-1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )+\frac {4}{27} \operatorname {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )\\ &=-\frac {\tan ^{-1}\left (\frac {3+2 x}{\sqrt {3} \sqrt {-3-4 x-x^2}}\right )}{3 \sqrt {3}}+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )-\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )-\frac {4}{9} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.44, size = 200, normalized size = 1.54 \[ \frac {1}{54} \left (-6 \sqrt {3} \tan ^{-1}\left (\frac {2 x+3}{\sqrt {3} \sqrt {-x^2-4 x-3}}\right )-3 \sqrt {1-2 i \sqrt {2}} \left (\sqrt {2}+2 i\right ) \tanh ^{-1}\left (\frac {\left (2-i \sqrt {2}\right ) x-2 i \sqrt {2}+2}{\sqrt {2+4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )-3 \sqrt {1+2 i \sqrt {2}} \left (\sqrt {2}-2 i\right ) \tanh ^{-1}\left (\frac {\left (2+i \sqrt {2}\right ) x+2 i \sqrt {2}+2}{\sqrt {2-4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 170, normalized size = 1.31 \[ \frac {1}{9} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt {-x^{2} - 4 \, x - 3} {\left (2 \, x + 3\right )}}{3 \, {\left (x^{2} + 4 \, x + 3\right )}}\right ) + \frac {1}{18} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} x + 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) + \frac {1}{18} \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} x - 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) + \frac {1}{9} \, \log \left (-\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) - \frac {1}{9} \, \log \left (\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 199, normalized size = 1.53 \[ \frac {1}{9} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) + \frac {2}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) + \frac {1}{9} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) - \frac {2}{9} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) + \frac {2}{9} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {{\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 152, normalized size = 1.17 \[ \frac {\sqrt {3}\, \arctan \left (\frac {\left (-4 x -6\right ) \sqrt {3}}{6 \sqrt {-x^{2}-4 x -3}}\right )}{9}+\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \left (4 \arctanh \left (\frac {3 x}{\left (-x -\frac {3}{2}\right ) \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}}\right )+\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}}{6}\right )\right )}{54 \sqrt {\frac {\frac {x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-4}{\left (\frac {x}{-x -\frac {3}{2}}+1\right )^{2}}}\, \left (\frac {x}{-x -\frac {3}{2}}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt {-x^{2} - 4 \, x - 3} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{x\,\sqrt {-x^2-4\,x-3}\,\left (2\,x^2+4\,x+3\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{x \sqrt {- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________